package com.project.shiro;

import org.apache.shiro.authz.AuthorizationException;
import org.apache.shiro.authz.UnauthorizedException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class PermittedPass {
    @ExceptionHandler({AuthorizationException.class, UnauthorizedException.class})
    public String press(){
        return "对不起，你的权限不够";
    }
}
